import React from 'react'
import { useParams, useMatch } from 'react-router-dom'

export default function Detail() {
  const {id, title, content} = useParams()

  // useMatch中的数据必须的这么写哦
  const match = useMatch('/home/message/detail/:id/:title/:content')
  console.log('match', match)

  return (
    <div>
      <ul>
        <li>id: {id}</li>
        <li>title: {title}</li>
        <li>content: {content}</li>
      </ul>
    </div>
  )
}
